import ajax from '@/request/ajax.js'
import qs from 'qs'


const api = {
  addMsg: '/admin/add',   //添加
  delete: '/admin/delete',
  search: '/admin/search',
  updata: '/admin/updata',
}



// export const detail = data => ajax({
//   url: api.detail,
//   method: 'POST',
//   data: data
//   // headers: {
//   //   'Content-Type': 'application/x-www-form-urlencoded'
//   // },
//   // data: qs.stringify(data)
// })

export const addMsg = data => ajax({
  url: api.add,
  method: 'POST',
  data: data
})

export const deleteMsg = data => ajax({
  url: api.delete,
  method: 'POST',
  data: data
})

export const search = data => ajax({
  url: api.search,
  method: 'POST',
  data: data
})

export const updata = data => ajax({
  url: api.updata,
  method: 'POST',
  data: data
})